import {
  get,
  post
} from 'lib/httpPlugin'
const domain = process.env.VUE_APP_URL
export default {
  getNewTitles (params = {}, pageNo = 1, pageSize = 100) { // 获取资讯
    return get(`${domain}/main/newsTitles?pageNo=${pageNo}&pageSize=${pageSize}`, params)
  },
  getBimList (params = {}) { // 获取资讯
    return get(`${domain}/bim/queryBimCategory`, params)
  },
  showArticle (params = {}, id) { // 获取资讯
    return get(`${domain}/main/showArticle/${id}`, params)
  },
  searchArticle (params = {}, pageNo = 1, pageSize = 100) { // 获取资讯
    return post(`${domain}/main/articles/search?pageNo=${pageNo}&pageSize=${pageSize}`, params)
  },
  queryBimCategory (params = {}) { // 获取资讯
    return get(`${domain}/bim/queryBimCategory`, params)
  },
  queryViewToken (params = {}, id) { // 获取资讯
    return get(`${domain}/bim/queryViewToken?fieldId=${id}`, params)
  },
  queryBimVideo (params = {}) { // 获取资讯
    return get(`${domain}/bim/queryBimVideo`, params)
  },
  CY71Categorys (params = {}) { // 获取资讯
    return get(`${domain}/main/articles/CY71Categorys`, params)
  },
  queryUploadObjs (params = {}, cate) { // 获取资讯
    return get(`${domain}/bim/queryUploadObjs?category=${cate}`, params)
  },
  getLeaderList (params = {}, cate) { // 获取资讯
    return get(`${domain}/anzren/personal/list`, params)
  },
  getDFZCFG (params = {}, page = 1, size = 100) { // 获取资讯
    return get(`${domain}/main/articles/DFZCFG?pageNo=${page}&pageSize=${size}`, params)
  },
  getXHWJGG (params = {}, page = 1, size = 100) { // 获取资讯
    return get(`${domain}/main/articles/XHWJGG?pageNo=${page}&pageSize=${size}`, params)
  },
  getZCFG (params = {}, page = 1, size = 100) { // 获取资讯
    return get(`${domain}/main/articles/ZCFG?pageNo=${page}&pageSize=${size}`, params)
  },
  getKJXZ (params = {}, page = 1, size = 100) { // 获取资讯
    return get(`${domain}/main/articles/KJXZ?pageNo=${page}&pageSize=${size}`, params)
  },
  getGLTZ (params = {}, page = 1, size = 100) { // 获取资讯
    return get(`${domain}/main/articles/GLTZ?pageNo=${page}&pageSize=${size}`, params)
  },
  getArticles (params = {}, type, page = 1, size = 100) { // 获取资讯
    return get(`${domain}/main/articles/${type}?pageNo=${page}&pageSize=${size}`, params)
  },
  queryElecBooks (params = {}, cate, page = 1, size = 100) { // 获取资讯
    return get(`${domain}/bim/queryElecBooks?category=${cate}&pageNo=${page}&pageSize=${size}`, params)
  }
}
